﻿using System;
using System.IO;
using System.Threading.Tasks;
using DeepZoomRipperCli;

namespace DeepZoomRipperCliCoreRT
{
    class Program
    {
        static async Task Main(string[] args)
        {
            Console.WriteLine(ThisAssembly.AssemblyTitle);
            Console.WriteLine(ThisAssembly.AssemblyInformationalVersion);
            Console.WriteLine();
            
            if (args.Length != 3 && args.Length != 2)
            {
                Console.WriteLine("Usage: source output tile-size");
                return;
            }

            string source = args[0];
            string outputFile = args[1];
            int tileSize = 512;
            if (args.Length == 3)
            {
                tileSize = int.Parse(args[2]);
            }

            await RipActions.Rip(source, new FileInfo(outputFile), tileSize, default);
        }
    }
}
